const {ccclass, property} = cc._decorator;
import {EVENT_TYPE} from "../common/enums";

@ccclass
export default class AttackButtion extends cc.Component {

    init(){
        this.node.on(cc.Node.EventType.MOUSE_UP, event =>{
            console.log("mouse down on button");
            this.node.dispatchEvent(new cc.Event.EventCustom(EVENT_TYPE.ATTACK,true))            
        },this) 
    }
    
    onLoad() {
        //暂时自动初始化
        this.init();
        // init logic
    }
}
